﻿@page "/Target/Target"

@using SubStationManagement.Server.Models
@using SubStationManagement.Server.Services
@inject TargetService targetService

@attribute [TabItemOption(Text = "测控目标")]

<Table TItem="Target"
       IsPagination="true" IsStriped="true" IsBordered="true" ClickToSelect="true" PageItemsSource="new int[] {10, 20}"
       ShowToolbar="true" ShowSearch="true" IsMultipleSelect="true" ShowExtendButtons="true" ShowSkeleton="true"
       ShowEmpty="true"
       OnQueryAsync="@OnQueryAsync"
       OnSaveAsync="OnSaveAsync" OnDeleteAsync="OnDeleteAsync">
    <TableColumns>
        <TableColumn @bind-Field="context.Name"></TableColumn>
        <TableColumn @bind-Field="context.Type"></TableColumn>
        <TableColumn @bind-Field="context.MeasureModuleId" LookupServiceKey="MeasureModule.Name"></TableColumn>
        <TableColumn @bind-Field="context.MeasureModuleLoop"></TableColumn>
        <TableColumn @bind-Field="context.DIDOModuleId" LookupServiceKey="DIDOModule.Name"></TableColumn>
        <TableColumn @bind-Field="context.DIDOModuleChannel"></TableColumn>
        <TableColumn @bind-Field="context.RecordingModuleId" LookupServiceKey="RecordingModule.Name"></TableColumn>
        <TableColumn @bind-Field="context.RecordingModuleLoop"></TableColumn>
        <TableColumn @bind-Field="context.Foward"></TableColumn>
        <TableColumn @bind-Field="context.Enable"></TableColumn>
    </TableColumns>
</Table>
